<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

</head>
<body>
<form action="">

    <input type="text" name="numer" placeholder="请输入要搜索的充电桩编号">
    <input type="text" name="name" placeholder="请输入要搜索的充电桩名称">
    <input type="text" name="content" placeholder="请输入要搜索的备注">

    <button>搜索</button>
</form>
<a class="btn-primary" href="{{url('out')}}">导出</a>
<a class="btn-primary" href="{{url('enter')}}">导入</a>
{{--<a class="btn-primary" href="{{url('enter')}}">导入</a>--}}
<table class="table">
    <tr>
        <th><input type="checkbox"></th>
        <th>序号</th>
        <th>充电桩编号</th>
        <th>充电桩名称</th>
        <th>终端类型</th>
        <th>充电端口</th>
        <th>当前状态</th>
        <th>创建人</th>
        <th>创建时间</th>
        <th>预约详情</th>
        <th>操作</th>
    </tr>
    @foreach($data as $v)
        <tr>
            <td><input type="checkbox"></td>
            <td>{{$v['id']}}</td>
            <td>{{$v['numer']}}</td>
            <td>{{$v['name']}}</td>
            <td>{{$v['type']}}</td>
            <td>{{$v['port']}}</td>
            <td>{{$v['status']}}</td>
            <td>{{$v['creater']}}</td>
            <td>{{$v['created_at']}}</td>
            <td><a href="">查看预约</a></td>
            <td>
                <a href="{{url('del',$v['id'])}}">删除</a>
            </td>
        </tr>
    @endforeach
</table>
{{$data->links()}}
<a href="dian" id="button">添加</a>
</body>
</html>
<script src="lib/jquery/1.9.1/jquery.js"></script>
<script>
    $(function () {
        $('#button').click(function () {
            $.ajax({
                url:"dian",
                dataType:"json",
                type:"get",
                success:function (res) {
                    // console.log(res)
                }
            })
        })
    })
</script>
